/*
 * \brief  Dataspace server interface
 * \author Norman Feske
 * \date   2006-07-05
 */

/*
 * Copyright (C) 2006-2009 Norman Feske
 * Genode Labs, Feske & Helmuth Systementwicklung GbR
 *
 * This file is part of the Genode OS framework, which is distributed
 * under the terms of the GNU General Public License version 2.
 */

#ifndef _INCLUDE__DATASPACE__SERVER_H_
#define _INCLUDE__DATASPACE__SERVER_H_

#include <dataspace/dataspace.h>
#include <base/server.h>

namespace Genode {

	class Dataspace_server : public Server_object, public Dataspace
	{
		public:

			int dispatch(int op, Ipc_istream &is, Ipc_ostream &os)
			{
				switch (op) {

				case SIZE:
					os << size();
					return 0;

				case PHYS_ADDR:
					os << phys_addr();
					return 0;
				}
				return -1;
			}
	};
}

#endif /* _INCLUDE__DATASPACE__SERVER_H_ */
